import http from "../utils/request";

// console.log(process.env.NODE_ENV);
// 获取验证码
export const getInitializeRegister = () =>
  http.get("/users/getCaptcha?v=next", {});
// 获取验证码

// 更新验证码
export const getRefreshRegister = () => http.get("/users/refreshCaptcha", {});
// 更新验证码

// 验证验证码
export const getVerificationRegister = (captcha) =>
  http.get("/users/verifyCaptcha", { params: { captcha } });
// 验证验证码

// 用户名登录
export const getUsernameRegister = (username, password) =>
  http.post("/users/login", { username, password });
// 用户名登录

// 获取登录二维码
export const postAcquireVerification = (sid) =>
  http.get("/users/getQrcode", { params: { sid } });
// 获取登录二维码

// 微信登录
export const getWeChatRegister = (wechatCode) =>
  http.get("/users/wechatLogin", { params: { wechatCode } });
// 微信登录

// 获取短信验证码
export const postSendTextMessage = (phoneNumber) =>
  http.post("/sms/send", { phoneNumber });
// 获取短信验证码

// 短信验证码验证
export const postSMSVerification = (code) =>
  http.post("/users/login?type=sms", { code });
// 短信验证码验证

// console.log(process.env);

// export const postAcquireVerification = (参数，参数) => http.请求方式(get/post)("地址"，{参数，参数})
